class Solution {
public:
    int getSum(int a, int b) {
        while (b != 0)
        {
            unsigned int carry = (unsigned int)(a & b) << 1; // 进位
            a = a ^ b; // 无进位相加
            b = carry; // 进位不为0的话就一直加，如a已经是a^b的结果，再^b，加进位
        }
        return a;
    }
};